﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Zj.DDDSample.Domain.Events
{
    public interface IEventHandler<TEvent>
        where TEvent : IEvent
    {
        bool CanHandle(IEvent @event);
        Task<bool> HandleAsync(TEvent @event, CancellationToken cancellationToken = default(CancellationToken));
    }
    public interface IEventHandler
        : IEventHandler<IEvent>
    {

    }

}
